import org.junit.*;

public class NGuessNumberTest {
    private static NGuessNumber ng = new NGuessNumber();

    @BeforeClass
    public static void setUpBeforeClass() throws Exception {
        System.out.println("@BeforeClass");
    }

    @AfterClass
    public static void tearDownAfterClass() throws Exception {
        System.out.println("@AfterClass");
    }

    @Before
    public void setUp() throws Exception {
        System.out.println("测试开始");
    }

    @After
    public void tearDown() throws Exception {
        System.out.println("测试结束");
    }


    @Test
    public void generateAnswer() {
        int[] arr = ng.generateAnswer();
        for (int i = 0; i < 4; i++) {
            System.out.println(arr[i]);
        }
    }

    @Test
    public void getPlayerInput() {
        int[] arr = ng.getPlayerInputa();
        for (int i = 0; i < 4; i++) {
            System.out.println(arr[i]);
        }
    }

    @Test
    public void compareGuessAnswer() {
        int[] rn = {1,2,3,4};
        int[] pi = {1,2,2,4};
        String count = ng.compareGuessAnswer();
        System.out.println(count);
    }
    @Test
    public void isWin() {
        for (int i = 0; i <= 4; i++) {
            boolean end = ng.isWin();
            System.out.println(i+":"+end);
        }

    }

}